home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dskut / bootmenu.zip / BOOTMENU.DOC < prev    next >
Text File  |  1994-02-16  |  7KB  |  181 lines

  1. BOOTMENU is yet another program which allows you to select between multiple
  2. AUTOEXEC.BAT and CONFIG.SYS files when you turn on your computer. It can
  3. also be used to provide menu access to various "turnkey" applications,
  4. with or without switching to a new system configuration.
  5.  
  6. - Easy to install and use... Single .COM file you call from AUTOEXEC.BAT's
  7. - "Smart" re-boot, only reloads DOS if the selection you make requires a
  8.   different AUTOEXEC or CONFIG file. You can have several selections, which
  9.   use the same files, but perform different functions based on the selection
  10.   number passed to AUTOEXEC.
  11. - Programmable timeout allows you to assume either a default configuration,
  12.   or the last one loaded if no selection is made.
  13. - AUTOEXEC's and CONFIG's can be separate files, or maintained in one large
  14.   file (or any combination thereof). You can piece together several small
  15.   files "on the fly" to build the actual AUTOEXEC or CONFIG that is used.
  16.  
  17. ** HOW IT WORKS:
  18.  
  19. When DOS first loads, BOOTMENU presents you with a menu of available
  20. configurations (up to 10), and allows you to select one, by pressing the
  21. corresponding digit. A programmable timeout (in seconds) counts down, and
  22. will assume either a default configuration or the last one loaded if you
  23. do not select one before it expires. Pressing SPACE, RETURN or ESCAPE will
  24. proceed to load the default or last configuration immediately.
  25.  
  26. Once a configuration has been determined, BOOTMENU looks at the AUTOEXEC
  27. and CONFIG file names defined for it, and if they are the same as the ones
  28. already in effect, BOOTMENU simply terminates, passing back the selection
  29. number as its ERRORLEVEL, this can be used by AUTOEXEC.BAT to perform
  30. different actions for the different selections.
  31.  
  32. If one or both configuration files are different than the files which were
  33. in effect when DOS last booted, BOOTMENU copies the required one(s) (from the
  34. BOOTMENU directory) into \AUTOEXEC.BAT and/or \CONFIG.SYS, sets a flag for
  35. itself in the file BOOTMENU.CTL, and then performs a warm-start of the PC,
  36. rebooting DOS with the new configuration.
  37.  
  38. When the PC re-boots, BOOTMENU knows from BOOTMENU.CTL that it is in a "reboot"
  39. phase, bypasses the menu, clears the BOOTMENU.CTL flag, and terminates with
  40. the selection number as its ERRORLEVEL.
  41.  
  42. ** SETTING UP BOOTMENU:
  43.  
  44. To configure BOOTMENU, you must set up a file called BOOTMENU.CFG, which
  45. contains information used by the program.
  46.  
  47. Thr first line in BOOTMENU.CFG has the following format:
  48.  
  49.                     <timeout>[|default]
  50.  
  51.     <timeout>   = This specifies the time (in seconds) that BOOTMENU will
  52.                   wait for you to pick a selection, before it proceeds to
  53.                   use its default value.
  54.  
  55.     <default>   = The default menu selection number to assume when no
  56.                   other selection is made. If this is not defined, the
  57.                   the LAST configuration loaded becomes the default.
  58.  
  59. The remaining lines in BOOTMENU.CFG have the following format:
  60.  
  61.                 <description>|<autoexec>|<config>
  62.  
  63.     <dscription>= This is the text which will appear in the menu selection.
  64.                   It should not be longer than 70 characters.
  65.     <autoexec>  = This is the file that will be used as AUTOEXEC.BAT when
  66.                   this selection is made.
  67.     <config>    = This is the file that will be used as CONFIG.SYS when
  68.                   this selection is made.
  69.  
  70. NOTES:  The <autoexec> and <config> files are kept in the BOOTMENU directory,
  71.         under any names you care to use, BOOTMENU copies them to \AUTOEXEC.BAT
  72.         or \CONFIG.SYS as necessary before re-booting dos.
  73.  
  74.         You may specify several files for <autoexec> or <config>, with each
  75.         name separated by a comma (','). BOOTMENU will concatinate all of the
  76.         files into a single AUTOEXEC.BAT or CONFIG.SYS.
  77.  
  78.         If you are using several small files, you may wish to group them
  79.         together into a single file. See "grouping files" later in this doc.
  80.  
  81.         If an entry for <autoexec> or <config> is left blank, BOOTMENU will
  82.         leave the existing files installed for that selection.
  83.  
  84. Each AUTOEXEC file should run the BOOTMENU program as near to the beginning
  85. as possible. !!! ALL AUTOEXEC's MUST EXECUTE BOOTMENU !!! If for some reason
  86. BOOTMENU is not executed after it has rebooted the system, it will fail to
  87. offer a menu the next time it is run (it thinks it's being run as a result of
  88. the re-boot it previously initiated).
  89.  
  90. BOOTMENU looks for all of its file in the same directory in which BOOTMENU.COM
  91. is located. If you wish to use a different directory, you may specify the path
  92. to BOOTMENU as a command line argument. If you are using a version of DOS which
  93. is earlier than 3.0, you should ALWAYS specify the path on the command line.
  94.  
  95. The first time you run BOOTMENU, you will see a message that it cannot find
  96. its control file (BOOTMENU.CTL), however it will create it before it terminates,
  97. and subsequent executions will not issue this message.
  98.  
  99. ** EXAMPLE FILES:
  100.  
  101.     BOOTMENU.CFG:
  102.         10|0
  103.         Standard System|AUTOEXEC.1|CONFIG.1
  104.         1Meg Ramdisk|AUTOEXEC.1|CONFIG.2
  105.         Bare system|AUTOEXEC.2|NUL
  106.  
  107.     AUTOEXEC.1:
  108.         @echo off
  109.         \BOOTMENU\BOOTMENU
  110.         path c:\dos;c:\cmds;c:\mc
  111.         prompt $p$g
  112.         set MCDIR=C:\MC
  113.         set MCTMP=E:\$
  114.         ver
  115.  
  116.     AUTOEXEC.2
  117.         @echo off
  118.         \BOOTMENU\BOOTMENU
  119.  
  120.     CONFIG.1
  121.         DEVICE=MOUSE.SYS 2 9600
  122.         FILES=20
  123.  
  124.     CONFIG.2
  125.         DEVICE=VDISK.SYS 1024 512 64 /E
  126.         DEVICE=MOUSE.SYS 2 9600
  127.         FILES=20
  128.  
  129. GROUPING FILES:
  130.  
  131. With a hard drive, each file takes a minimum amount of disk space equal to
  132. one "cluster", and thus if you are using several very small files, you will
  133. waste some disk space with each file.
  134.  
  135. BOOTMENU allows you to group some (or all) of your AUTOEXEC and CONFIG files
  136. into the single file "BOOTMENU.DAT". Each file is tagged with a line that
  137. begins with '!', and contains the logical name by which you wish to refer
  138. to the file. The '!' character is also used in the BOOTMENU.CFG file to
  139. indicate files which are to be extracted from BOOTMENU.DAT.
  140.  
  141. For example, the above sample files could also be setup as:
  142.  
  143.     BOOTMENU.CFG:
  144.         10|0
  145.         Standard System|!AUTOEXEC.1|!CONFIG.1
  146.         1Meg Ramdisk|!AUTOEXEC.1|!CONFIG.2
  147.         Bare system|!AUTOEXEC.2|NUL
  148.  
  149.     BOOTMENU.DAT
  150.         !AUTOEXEC.1
  151.         @echo off
  152.         \BOOTMENU\BOOTMENU
  153.         path c:\dos;c:\cmds;c:\mc
  154.         prompt $p$g
  155.         set MCDIR=C:\MC
  156.         set MCTMP=E:\$
  157.         ver
  158.         !AUTOEXEC.2
  159.         @echo off
  160.         \BOOTMENU\BOOTMENU
  161.         !CONFIG.1
  162.         DEVICE=MOUSE.SYS 2 9600
  163.         FILES=20
  164.         !CONFIG.2
  165.         DEVICE=VDISK.SYS 1024 512 64 /E
  166.         DEVICE=MOUSE.SYS 2 9600
  167.         FILES=20
  168.  
  169. SOURCE CODE:
  170.  
  171. The MICRO-C source code for BOOTMENU is included. Permission is given to
  172. modify and use this program for personal (non-commerical) use only.
  173.  
  174. Note: Since BOOTMENU uses the MICRO-C Windowing Library (which is not included
  175.       in the shareware demo version of the compiler, you will need the
  176.       commercial MICRO-C package to re-compile BOOTMENU.C
  177.  
  178. Enjoy!
  179.  
  180. Dave Dunfield
  181.